package globals
{

	import common.levels.LevelManager;
	import common.loader.LoaderManager;

	import core.AssetsManager;
	import core.BattleManager;
	import core.CursorManager;
	import core.SoundManager;
	import core.StateManager;

	import flash.display.Stage;
	import flash.utils.getTimer;

	import net.ServiceManager;

	import ui.UIManager;
	import ui.map.MapManager;
	import ui.scene.SceneManager;
	import ui.units.UnitsManager;

	public class Global
	{
		public static var cursorManager:CursorManager;
		public static var uiManager:UIManager;
		public static var levelManager:LevelManager;
		public static var unitManager:UnitsManager;
		public static var assetsManager:AssetsManager;
		public static var sceneManager:SceneManager;
		public static var mapManager:MapManager;
		public static var serviceManager:ServiceManager;
		public static var battleManager:BattleManager;
		public static var soundManager:SoundManager;
		public static var stateManager:StateManager;

		public static var stage:Stage;
		public static var timeStamp:int;
		public static var game:Game;

		public function Global()
		{

		}

		public static function init(topStage:Stage, topGame:Game):void
		{
			stage = topStage;
			game = topGame;

			cursorManager = new CursorManager();
			unitManager = new UnitsManager();
			levelManager = new LevelManager();
			assetsManager = new AssetsManager();
			mapManager = new MapManager();
			sceneManager = new SceneManager();
			serviceManager = new ServiceManager();

			uiManager = new UIManager();
			battleManager = new BattleManager();
			soundManager = new SoundManager();
			stateManager = new StateManager();

			serviceManager.init();
			uiManager.init();
			sceneManager.init();
		}
	}
}